//
//  CookStyleCell.m
//  project_delicious
//
//  Created by 章历杰 on 15/4/6.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "CookStyleCell.h"
#import "UIColor+AddColor.h"
@implementation CookStyleCell

- (void)dealloc
{
    [_name release];
    [_nameLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.nameLabel = [[UILabel alloc] init];
        [self addSubview:self.nameLabel];
        [_nameLabel release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.nameLabel.text = self.name;
    self.nameLabel.frame = CGRectMake(10, 10, self.frame.size.width-20, self.frame.size.height-20);
    self.nameLabel.layer.cornerRadius = 10;
    self.nameLabel.layer.masksToBounds = YES;
    self.nameLabel.layer.borderWidth = 0.5;
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
    self.nameLabel.backgroundColor = [UIColor colorFromHexCode:@"ffce7b"];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
